package com.jyy.prefabricated.controller;

import com.jyy.prefabricated.common.AjaxResult;
import com.jyy.prefabricated.dto.StudentQuizDto;
import com.jyy.prefabricated.entity.Student;
import com.jyy.prefabricated.entity.StudentQuiz;
import com.jyy.prefabricated.entity.ViewLog;
import com.jyy.prefabricated.service.ViewLogService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import javax.validation.Valid;

/**
 * 视频日志表(ViewLog)表控制层
 *
 * @author mrl
 * @since 2021-10-15 10:51:43
 */
@Slf4j
@RequestMapping("/api")
@RestController
public class ViewLogController {
    /**
     * 服务对象
     */
    @Resource
    private ViewLogService viewLogService;
    /**
     * 开始练习
     *
     * @param dto
     * @return
     */
    @PostMapping("/view-log")
    public AjaxResult insert(@Valid @RequestBody ViewLog dto) {
        ViewLog result = viewLogService.insert(dto);
        return AjaxResult.success(result);
    }


}